//
//  code.h
//  reSearchDemo
//
//  Created by 云库 on 15/9/24.
//  Copyright (c) 2015年 Kiwaro. All rights reserved.
//

#ifndef reSearchDemo_code_h
#define reSearchDemo_code_h


//选择规格界面----手写
/*
 
 /** 界面*/
- (void)createSubViews{
    //1.顶部View
    UIImageView * topImg=[[UIImageView alloc]initWithFrame:CGRectMake(0, 65, self.view.width, 150)];
    [topImg sd_setImageWithURL:[NSURL URLWithString:self.goods.defaultImage] placeholderImage:[UIImage imageNamed:@"背景.png"]];
    [self.view addSubview:topImg];
    
    //2.小图片View
    UIImageView * commodityImg=[[UIImageView alloc]initWithFrame:CGRectMake(5, topImg.height+topImg.y, 100, 100)];
    commodityImg.backgroundColor=[UIColor redColor];
    [self.view addSubview:commodityImg];
    
    //3.价格lable
    UILabel * priseLab=[[UILabel alloc]initWithFrame:CGRectMake(commodityImg.frame.size.width+5+10, commodityImg.y,100, commodityImg.height)];
    NSString * money=[NSString stringWithFormat:@"¥%f",self.goods.xmoney];
    priseLab.text=[money substringToIndex:5];
    priseLab.textColor=[UIColor redColor];
    [self.view addSubview:priseLab];
    
    
    //4.
    
    
    //规格Lable
    for (int i=0; i<self.specArr.count; i++) {
        UILabel * lab=[[UILabel alloc]initWithFrame:CGRectMake(i%2*self.view.width/2, i/2*40+currentChoose.y+currentChoose.frame.size.height+15, 150, 100)];
        Specval * specval= self.specArr[i];
        
        NSString *string=[NSString stringWithFormat:@"容量:%@\n重量:%@\n售价:%@",specval.val,specval.weight,specval.sales];
        lab.text=string;
        lab.numberOfLines=0;
        lab.textColor=[UIColor whiteColor];
        lab.backgroundColor=[UIColor grayColor];
        [self.view addSubview:lab];
        
        UIButton * btn=[UIButton buttonWithType:UIButtonTypeSystem];
        btn.frame=CGRectMake(i%2*self.view.frame.size.width/2, i/2*40+currentChoose.frame.origin.y+currentChoose.frame.size.height+15, 150, 60);
        //        [btn setTitle:[NSString stringWithFormat:@"%@",string] forState:UIControlStateNormal];
        btn.backgroundColor=[UIColor clearColor];
        btn.tintColor=[UIColor blackColor];
        btn.titleLabel.font =[UIFont systemFontOfSize:15];
        btn.tag=20+i;
        [btn addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
        [self.view addSubview:btn];
    }
    
}
 
 */


#endif
